import React, { useEffect, useState } from 'react'

export default function List({ str }) {

    const [data, setData] = useState([])

    useEffect(() => {
        const arr = []
        arr.length = 15000

        for (let i = 0; i < arr.length; i++) {
            arr.fill(i + 1, i)
        }
        setData(arr)
    }, [str])

    return (
        <div>
            {data.map(item => {
                return <p key={item}>{str}</p>
            })}
        </div>
    )
}
